﻿@model List<BLL.BO.Challenger>

@{
    ViewBag.Title = "Challengers";
}

<table class="statistics">
    <tr>
        <th>Név</th>
        <th>Challenges</th>
    </tr>
    @foreach (var challenger in Model)
    {
        <tr>
            <td>@Html.ActionLink(challenger.Name, "ChallengerDetail", new { id = challenger.Id })</td>
            <td>
            @if (challenger.Films.Count == 0)
            {
                @:-
            }
            else
            {
                @Html.Raw(String.Join(",", challenger.Films.Select(f => Html.ActionLink(f.Title, "ChallengeDetail", new { id = f.Id }))))
            }
            </td>
        </tr>
    }
</table>
